/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author user
 */
@Entity
@Table(name = "pos_transaction_mk_work_order_detail")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "PosTransactionMkWorkOrderDetail.findAll", query = "SELECT p FROM PosTransactionMkWorkOrderDetail p"),
//    @NamedQuery(name = "PosTransactionMkWorkOrderDetail.findBySync", query = "SELECT p FROM PosTransactionMkWorkOrderDetail p WHERE p.sync = :sync"),
//    @NamedQuery(name = "PosTransactionMkWorkOrderDetail.findByWorkOrderDetailId", query = "SELECT p FROM PosTransactionMkWorkOrderDetail p WHERE p.workOrderDetailId = :workOrderDetailId"),
//    @NamedQuery(name = "PosTransactionMkWorkOrderDetail.findByWorkOrderDetailQuantity", query = "SELECT p FROM PosTransactionMkWorkOrderDetail p WHERE p.workOrderDetailQuantity = :workOrderDetailQuantity"),
//    @NamedQuery(name = "PosTransactionMkWorkOrderDetail.findByWorkOrderDetailSent", query = "SELECT p FROM PosTransactionMkWorkOrderDetail p WHERE p.workOrderDetailSent = :workOrderDetailSent"),
//    @NamedQuery(name = "PosTransactionMkWorkOrderDetail.findByWorkOrderDetailUnsent", query = "SELECT p FROM PosTransactionMkWorkOrderDetail p WHERE p.workOrderDetailUnsent = :workOrderDetailUnsent"),
//    @NamedQuery(name = "PosTransactionMkWorkOrderDetail.findByWorkOrderDetailPrice", query = "SELECT p FROM PosTransactionMkWorkOrderDetail p WHERE p.workOrderDetailPrice = :workOrderDetailPrice")})
public class PosTransactionMkWorkOrderDetail implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "work_order_detail_id")
    private Integer workOrderDetailId;
    @Column(name = "work_order_detail_quantity")
    private BigDecimal workOrderDetailQuantity;
    @Column(name = "work_order_detail_sent")
    private BigDecimal workOrderDetailSent;
    @Column(name = "work_order_detail_unsent")
    private BigDecimal workOrderDetailUnsent;
    @Column(name = "work_order_detail_price")
    private BigDecimal workOrderDetailPrice;
    @Lob
    @Column(name = "work_order_detail_description")
    private String workOrderDetailDescription;
    @JoinColumn(name = "work_order_detail_work_order_id", referencedColumnName = "work_order_id")
    @ManyToOne
    private PosTransactionMkWorkOrder workOrderDetailWorkOrderId;
    @JoinColumn(name = "work_order_detail_item_id", referencedColumnName = "item_id")
    @ManyToOne
    private PosMasterItem workOrderDetailItemId;
     

    public PosTransactionMkWorkOrderDetail() {
    }

    public PosTransactionMkWorkOrderDetail(Integer workOrderDetailId) {
        this.workOrderDetailId = workOrderDetailId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getWorkOrderDetailId() {
        return workOrderDetailId;
    }

    public void setWorkOrderDetailId(Integer workOrderDetailId) {
        this.workOrderDetailId = workOrderDetailId;
    }

    public BigDecimal getWorkOrderDetailQuantity() {
        return workOrderDetailQuantity;
    }

    public void setWorkOrderDetailQuantity(BigDecimal workOrderDetailQuantity) {
        this.workOrderDetailQuantity = workOrderDetailQuantity;
    }

    public BigDecimal getWorkOrderDetailSent() {
        return workOrderDetailSent;
    }

    public void setWorkOrderDetailSent(BigDecimal workOrderDetailSent) {
        this.workOrderDetailSent = workOrderDetailSent;
    }

    public BigDecimal getWorkOrderDetailUnsent() {
        return workOrderDetailUnsent;
    }

    public void setWorkOrderDetailUnsent(BigDecimal workOrderDetailUnsent) {
        this.workOrderDetailUnsent = workOrderDetailUnsent;
    }

    public BigDecimal getWorkOrderDetailPrice() {
        return workOrderDetailPrice;
    }

    public void setWorkOrderDetailPrice(BigDecimal workOrderDetailPrice) {
        this.workOrderDetailPrice = workOrderDetailPrice;
    }

    public String getWorkOrderDetailDescription() {
        return workOrderDetailDescription;
    }

    public void setWorkOrderDetailDescription(String workOrderDetailDescription) {
        this.workOrderDetailDescription = workOrderDetailDescription;
    }

    public PosTransactionMkWorkOrder getWorkOrderDetailWorkOrderId() {
        return workOrderDetailWorkOrderId;
    }

    public void setWorkOrderDetailWorkOrderId(PosTransactionMkWorkOrder workOrderDetailWorkOrderId) {
        this.workOrderDetailWorkOrderId = workOrderDetailWorkOrderId;
    }

    public PosMasterItem getWorkOrderDetailItemId() {
        return workOrderDetailItemId;
    }

    public void setWorkOrderDetailItemId(PosMasterItem workOrderDetailItemId) {
        this.workOrderDetailItemId = workOrderDetailItemId;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (workOrderDetailId != null ? workOrderDetailId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PosTransactionMkWorkOrderDetail)) {
            return false;
        }
        PosTransactionMkWorkOrderDetail other = (PosTransactionMkWorkOrderDetail) object;
        if ((this.workOrderDetailId == null && other.workOrderDetailId != null) || (this.workOrderDetailId != null && !this.workOrderDetailId.equals(other.workOrderDetailId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ronsicecream.pos.entities.PosTransactionMkWorkOrderDetail[ workOrderDetailId=" + workOrderDetailId + " ]";
    }
    
}
